package com.pomr.service.simstorage;

import java.util.List;

import com.pomr.model.equipmentstorage.EquipmentStorage;
import com.pomr.model.equipmentstorage.EquipmentStorageDetail;
import com.pomr.model.simstorage.SimStorage;
import com.pomr.model.simstorage.SimStorageDetail;
import com.pomr.model.sys.User;
import com.pomr.util.page.Page;

public interface SimStorageService {
	
	/**
	 * 查询库存记录
	 * @param equipmentid
	 * @param agencyid
	 * @param manufacturerid
	 * @param page
	 * @param limit
	 * @return
	 * @throws Exception
	 */
	public Page<List<SimStorage>> searchStorages(String networkid, String agencyid, String manufacturerid, String page, String limit) throws Exception;
	
	/**
	 * 通过主表id查询库存详细信息 
	 * @param storage
	 * @return
	 * @throws Exception
	 */
	public Page<List<SimStorageDetail>> searchStorageDetails(String id, String page, String limit) throws Exception;
	
	/**
	 * 删除SIM卡信息
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public boolean deleteStorageDetails(String[] ids) throws Exception;
	
	/**
	 * SIM卡报损
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public boolean damageStorageDetails(String[] ids) throws Exception;
	
	/**
	 * SIM卡修复
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public boolean repairStorageDetails(String[] ids) throws Exception;
	
	/**
	 * 更新设备领用定金
	 * @param storage
	 * @return
	 * @throws Exception
	 */
	public boolean editMoney(SimStorage storage) throws Exception;
	
	/**
	 * 清库
	 * @param ids
	 * @param reason
	 * @return
	 * @throws Exception
	 */
	public boolean cleanStorageDetails(String[] ids, String reason) throws Exception;
	
	/**
	 * 通过SIM卡获取绑定的设备信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public EquipmentStorageDetail searchBindEquipment(String id) throws Exception;
	
	/**
	 * 设备类型、厂商、型号联动获取设备
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public List<EquipmentStorageDetail> searchEquipmentLd(String kindid, String manufacturerid, String spec, User user) throws Exception;
	
	public Page<List<SimStorageDetail>> searchSimBySnOfNoUse(String page, String limit, String sn, User user) throws Exception;
}
